home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-18
/
incremnt.zip
/
INCREMNT.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-10-02
|
3KB
|
139 lines
@ECHO OFF
CLS
IF (%1)==() GOTO DIRECT
IF (%1)==(INCREMNT) GOTO NONO
IF (%1)==(incremnt) GOTO NONO
IF NOT EXIST %1.%2 ECHO SORRY the file %1.%2 does NOT exist in this directory.
IF NOT EXIST %1.%2 GOTO END
IF EXIST %1.BAT GOTO WORK
ECHO @ECHO OFF >> %1.BAT
ECHO INCREMNT %1 %2 >> %1.BAT
:WORK
IF EXIST %1.20 GOTO 20
IF EXIST %1.19 GOTO 19
IF EXIST %1.18 GOTO 18
IF EXIST %1.17 GOTO 17
IF EXIST %1.16 GOTO 16
IF EXIST %1.15 GOTO 15
IF EXIST %1.14 GOTO 14
IF EXIST %1.13 GOTO 13
IF EXIST %1.12 GOTO 12
IF EXIST %1.11 GOTO 11
IF EXIST %1.10 GOTO 10
IF EXIST %1.09 GOTO 09
IF EXIST %1.08 GOTO 08
IF EXIST %1.07 GOTO 07
IF EXIST %1.06 GOTO 06
IF EXIST %1.05 GOTO 05
IF EXIST %1.04 GOTO 04
IF EXIST %1.03 GOTO 03
IF EXIST %1.02 GOTO 02
IF EXIST %1.01 GOTO 01
ECHO PROCESSING %1.%2 INTO %1.01
COPY %1.%2 %1.01
GOTO END
:01
ECHO PROCESSING %1.%2 INTO %1.02
COPY %1.%2 %1.02
GOTO END
:02
ECHO PROCESSING %1.%2 INTO %1.03
COPY %1.%2 %1.03
GOTO END
:03
ECHO PROCESSING %1.%2 INTO %1.04
COPY %1.%2 %1.04
GOTO END
:04
ECHO PROCESSING %1.%2 INTO %1.05
COPY %1.%2 %1.05
GOTO END
:05
ECHO PROCESSING %1.%2 INTO %1.06
COPY %1.%2 %1.06
GOTO END
:06
ECHO PROCESSING %1.%2 INTO %1.07
COPY %1.%2 %1.07
GOTO END
:07
ECHO PROCESSING %1.%2 INTO %1.08
COPY %1.%2 %1.08
GOTO END
:08
ECHO PROCESSING %1.%2 INTO %1.09
COPY %1.%2 %1.09
GOTO END
:09
ECHO PROCESSING %1.%2 INTO %1.10
COPY %1.%2 %1.10
GOTO END
:10
ECHO PROCESSING %1.%2 INTO %1.11
COPY %1.%2 %1.11
GOTO END
:11
ECHO PROCESSING %1.%2 INTO %1.12
COPY %1.%2 %1.12
GOTO END
:12
ECHO PROCESSING %1.%2 INTO %1.13
COPY %1.%2 %1.13
GOTO END
:13
ECHO PROCESSING %1.%2 INTO %1.14
COPY %1.%2 %1.14
GOTO END
:14
ECHO PROCESSING %1.%2 INTO %1.15
COPY %1.%2 %1.15
GOTO END
:15
ECHO PROCESSING %1.%2 INTO %1.16
COPY %1.%2 %1.16
GOTO END
:16
ECHO PROCESSING %1.%2 INTO %1.17
COPY %1.%2 %1.17
GOTO END
:17
ECHO PROCESSING %1.%2 INTO %1.18
COPY %1.%2 %1.18
GOTO END
:18
ECHO PROCESSING %1.%2 INTO %1.19
COPY %1.%2 %1.19
GOTO END
:19
ECHO PROCESSING %1.%2 INTO %1.20
COPY %1.%2 %1.20
:20
ECHO YOU NEED TO CHANGE THE NAME OF THE FILE YOU ARE SAVING BECAUSE YOU HAVE
ECHO MADE 20 OF THEM AND THAT IS ALL THIS PROGRAM DOES. SO DELETE %1.BAT
ECHO AND RENAME %1.%2 TO 1%1.%2 AND RECALL INCREMNT %1 %2
PAUSE
GOTO END
:DIRECT
CLS
ECHO SYNTAX = INCREMNT FILENAME EXT
ECHO INCREMNT = FIRST NAME OF PROGRAM ( STARTS PROGRAM )
ECHO FILENAME = FIRST NAME OF FILE TO INCREMENT ( and a space )
ECHO EXT = THE EXTENSION NAME OF THE FILE TO INCREMENT
ECHO There must be a space between the FILENAME and the ESTension.
ECHO INCREMNT.BAT makes incremented backup files of input %%1.%%2
ECHO and makes a batch file in the directory of the file you are in
ECHO that gives INCREMNT.BAT the filename.ext each time it is called.
ECHO MEANING type on your document and to save it call increment and
ECHO give it the FILENAME and EXTension. INCREMNT.BAT increments the
ECHO file and makes a batch file to make the next incrementing easier.
ECHO The incremented files sit in the first part of the alphabetically
ECHO organized directory and the file your are working on sits at the end.
ECHO This makes it easier to find and work on. Enjoy.
ECHO INCREMNT.BAT By Steve Elliott
PAUSE
GOTO END
:NONO
ECHO Please do not alter INCREMNT.BAT with it's self.
PAUSE
:END